﻿using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using CE.Database;

/// <summary>
/// Summary description for EnrollStatusDB
/// </summary>
/// 
namespace CE.CarInsurance
{
    public class EnrollStatusDB
    {
        public DataSet GetEnrollStatus(string Email)
        {
            DataSet _dsEnrollStatus = null;
            MyDatabase _db = new MyDatabase();
            string _spName = "[sprocCXCRMEnrollStatusSelectItemByEmail]";

            SortedList _spara = new SortedList();
            _spara.Add("@Email", Email);

            using (DataSet _ds = _db.GetDataSet(_spName, _spara))
            {
                if (_ds != null && _ds.Tables.Count > 0)
                {
                    _dsEnrollStatus = _ds;
                }
            }
            return _dsEnrollStatus;
        }

        public DataSet GetEnrollStatus(Int64 CECarId, Int64 RefCEUserId)
        {
            DataSet _dsEnrollStatus = null;
            MyDatabase _db = new MyDatabase();
            string _spName = "[sprocCXCRMEnrollStatusSelectItemByUserId]";

            SortedList _spara = new SortedList();
            _spara.Add("@CECarId", CECarId);
            _spara.Add("@RefCEUserId", RefCEUserId);

            using (DataSet _ds = _db.GetDataSet(_spName, _spara))
            {
                if (_ds != null && _ds.Tables.Count > 0)
                {
                    _dsEnrollStatus = _ds;
                }
            }
            return _dsEnrollStatus;
        }

    }
}